<%@page import="org.toolbook.util.PropUtil"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
<head>
<jsp:include page="/WEB-INF/pages/include/head.jsp"></jsp:include>
<link href="/css/index.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/js/index.js"></script>
<script type="text/javascript" src="/js/validate-code.js"></script>
</head>
<body>
	<form id="login-form" class="form-horizontal" role="form" action="/user/login" method="post">
		<h3 style="text-align: center;">用户登陆</h3>
		<div class="form-group">
			<label for="inputUserName" class="col-sm-3 control-label">用户名</label>
			<div class="col-sm-8">
				<input type="text" class="form-control" id="inputUserName" name="username" value="${username }"
					placeholder="请输入用户名">
			</div>
		</div>
		<div class="form-group">
			<label for="inputPassword" class="col-sm-3 control-label">密　码</label>
			<div class="col-sm-8">
				<input type="password" class="form-control" id="inputPassword" name="password" value="${password }"
					placeholder="请输入密码">
			</div>
		</div>
		<div class="form-group">
			<label for="inputCode" class="col-sm-3 control-label">验证码</label>
			<div class="col-sm-8">
				<input type="text" class="form-control" id="inputCode" name="code" value=""
					placeholder="请输入验证码">
				<img src="/validateCode" id="validateCode" style="border: 1px solid #bdbdbd;border-radius:5px;cursor: pointer;"
					onclick="refersh(this);"/>
				<a href="javascript:void(0);" onclick="refershImg();">看不清</a>
			</div>
		</div>
		<div class="form-group">
			<div class="col-sm-offset-3 col-sm-8">
				<div class="checkbox">
					<input type="checkbox" name="auto_login"><span style="color: gray;"> <%=PropUtil.getProperty("cookieTime") %>天内自动登陆 </span>
				</div>
			</div>
		</div>
		<div class="form-group">
			<div class="col-sm-offset-3 col-sm-8">
				<button type="submit" class="btn btn-primary"> 登 陆 </button>
				<a href="/reg" class="btn btn-info">注册新用户</a>
				<!-- 反馈信息隐藏域 -->
				<input type="hidden" id="username_msg" value="${username_info }"/>
				<input type="hidden" id="password_msg" value="${password_info }"/>
				<input type="hidden" id="code_msg" value="${code_info }"/>
				<input type="hidden" id="up_msg" value="${up_info }"/>
				<input type="hidden" id="res_msg"/>
			</div>
		</div>
	</form>
	<jsp:include page="/WEB-INF/pages/include/copyright.jsp"></jsp:include>
</body>
</html>
